﻿namespace Framework.Scene
{
    /// <summary>
    /// 场景加载辅助器
    /// </summary>
    public interface ILoadSceneAgent
    {
        /// <summary>
        /// 加载场景
        /// </summary>
        /// <param name="sceneName">场景名称</param>
        void LoadScene(string sceneName);
        /// <summary>
        /// 加载场景
        /// </summary>
        /// <param name="sceneId">场景Id</param>
        void LoadScene(int sceneId);
        /// <summary>
        /// 加载场景
        /// </summary>
        /// <param name="sceneName">场景名称</param>
        /// <param name="callback">加载场景回调</param>
        void LoadSceneAsync(string sceneName, LoadSceneCallback callback);
        /// <summary>
        /// 加载场景
        /// </summary>
        /// <param name="sceneId">场景Id</param>
        /// <param name="callback">加载场景回调</param>
        void LoadSceneAsync(int sceneId, LoadSceneCallback callback);
        /// <summary>
        /// 初始化接口
        /// </summary>
        void Init();
        /// <summary>
        /// 重置加载辅助器
        /// </summary>
        void Reset();
        /// <summary>
        /// 释放接口
        /// </summary>
        void Destroy();
        /// <summary>
        /// 轮询接口
        /// </summary>
        /// <param name="frameTime">逻辑一帧时间</param>
        /// <param name="realTime">实际一帧时间</param>
        void OnUpdate(float frameTime, float realTime);

        /// <summary>
        /// 获取场景加载进度
        /// </summary>
        int GetLoadingProcess();

        /// <summary>
        /// 激活场景
        /// </summary>
        void AllowSceneActivation();
    }
}
